package com.etcn.modules.busi.order.pojo;

import com.alibaba.fastjson.annotation.JSONField;
import com.etcn.common.pojo.BaseEntity;
import com.etcn.common.utils.StringUtil;

import java.util.Date;

/**
 * 发票entity
 * @author guozc
 * @date 2018-03-20 13:28:16
 */
public class WmInvoice extends BaseEntity<WmInvoice> {

    private static final long serialVersionUID = 1L;
    
    /**
	 * 主键
	 */
    private Long id;

    /**
	 * 会员id
	 */
    @JSONField(serialize = false)
    private String memberId;

    /**
	 * 订单号
	 */
    @JSONField(serialize = false)
    private String orderSn;
    
    /**
     * 多个订单号
     */
    private String[] orderSns;

    /**
	 * 发票抬头
	 */
    private String invoiceHead;

    /**
     * 发票抬头类型(1:企业抬头,2:个人/非企业抬头)
     */
    private String invoiceHeadType;

    /**
	 * 统一信用代码
	 */
    private String creditCode;

    /**
	 * 发票类型(1:普通,2:专票)
	 */
    @JSONField(serialize = false)
    private String invoiceType;
    
    /**
     * 发票类型名称
     */
    @JSONField(serialize = false)
    private String invoiceTypeName;

    /**
	 * 发票金额
	 */
    private String invoiceAmount;

    /**
	 * 寄送地址
	 */
    private String sendAddress;

    /**
     * 寄送详细地址
     */
    private String sendDetailAddress;

    /**
	 * 收件人
	 */
    private String reveiver;

    /**
	 * 联系电话
	 */
    private String tel;
    
    /**
     * 内容
     */
    private String content;

    /**
	 * 申请时间
	 */
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private Date applyTime;

    /**
	 * 状态(1:申请中,2:已发送)
	 */
    private String status;
    
    /**
     * 状态名称
     */
    private String statusName;

	public WmInvoice() {
	}
	
    public Long getId() {
       	return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    
    public String getMemberId() {
        return memberId;
    }
    
    public void setMemberId(String memberId) {
        this.memberId = memberId;
    }

    public String getOrderSn() {
        return orderSn;
    }
    
    public void setOrderSn(String orderSn) {
        this.orderSn = orderSn;
    }

    public String getInvoiceHead() {
        return invoiceHead;
    }
    
    public void setInvoiceHead(String invoiceHead) {
        this.invoiceHead = invoiceHead;
    }

    public String getCreditCode() {
        return creditCode;
    }
    
    public void setCreditCode(String creditCode) {
        this.creditCode = creditCode;
    }

    public String getInvoiceType() {
        return invoiceType;
    }
    
    public void setInvoiceType(String invoiceType) {
        this.invoiceType = invoiceType;
    }

    public String getInvoiceAmount() {
        return invoiceAmount;
    }
    
    public void setInvoiceAmount(String invoiceAmount) {
        this.invoiceAmount = invoiceAmount;
    }

    public String getSendAddress() {
        return sendAddress;
    }
    
    public void setSendAddress(String sendAddress) {
        this.sendAddress = sendAddress;
    }

    public String getReveiver() {
        return reveiver;
    }
    
    public void setReveiver(String reveiver) {
        this.reveiver = reveiver;
    }

    public String getTel() {
        return tel;
    }
    
    public void setTel(String tel) {
        this.tel = tel;
    }

    public Date getApplyTime() {
        return applyTime;
    }
    
    public void setApplyTime(Date applyTime) {
        this.applyTime = applyTime;
    }

    public String getStatus() {
        return status;
    }
    
    public void setStatus(String status) {
        this.status = status;
    }

	public String getInvoiceTypeName() {
	
		return invoiceTypeName;
	}

	public void setInvoiceTypeName(String invoiceTypeName) {
	
		this.invoiceTypeName = invoiceTypeName;
	}

	public String getStatusName() {
	
		return statusName;
	}
	
	public void setStatusName(String statusName) {
	
		this.statusName = statusName;
	}
	
	public String getContent() {
	
		return content;
	}
	
	public void setContent(String content) {
	
		this.content = content;
	}
	
	public String[] getOrderSns() {
		if(orderSns == null && StringUtil.isNotEmpty(orderSn)){
			orderSns = this.orderSn.split(",");
		}
		return orderSns;
	}

	public void setOrderSns(String[] orderSns) {
	
		this.orderSns = orderSns;
	}

    public String getInvoiceHeadType() {
        return invoiceHeadType;
    }

    public void setInvoiceHeadType(String invoiceHeadType) {
        this.invoiceHeadType = invoiceHeadType;
    }

    public String getSendDetailAddress() {
        return sendDetailAddress;
    }

    public void setSendDetailAddress(String sendDetailAddress) {
        this.sendDetailAddress = sendDetailAddress;
    }
}
